package entity;

import java.io.Serializable;
import java.util.Date;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;

@Entity
public class PaymentManagementEntity implements Serializable {
    private static long serialVersionUID = 1L;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public static void setSerialVersionUID(long aSerialVersionUID) {
        serialVersionUID = aSerialVersionUID;
    }
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private int monthBilling;
    private double totalPaymentCurrent;
    private double paymentReceived;
    private double paymentLeft;
    private double outstandingBilling;
    private boolean expired;
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date datePaid;
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date startDate;
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date endDate;
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date dueDate;
            
    @ManyToOne
    private StakeholderEntity stakeholder;
    @OneToMany (mappedBy = "paymentManagement")
    private List<PaymentItemEntity> paymentItem = new ArrayList<PaymentItemEntity>();
    @OneToOne (mappedBy = "paymentManagement")
    private TransactionsEntity transaction;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public int getMonthBilling() {
        return monthBilling;
    }

    public void setMonthBilling(int monthBilling) {
        this.monthBilling = monthBilling;
    }

    public double getTotalPaymentCurrent() {
        return totalPaymentCurrent;
    }

    public void setTotalPaymentCurrent(double totalPaymentCurrent) {
        this.totalPaymentCurrent = totalPaymentCurrent;
    }

    public double getPaymentReceived() {
        return paymentReceived;
    }

    public void setPaymentReceived(double paymentReceived) {
        this.paymentReceived = paymentReceived;
    }

    public double getPaymentLeft() {
        return paymentLeft;
    }

    public void setPaymentLeft(double paymentLeft) {
        this.paymentLeft = paymentLeft;
    }

    public boolean isExpired() {
        return expired;
    }

    public void setExpired(boolean expired) {
        this.expired = expired;
    }

    public Date getDatePaid() {
        return datePaid;
    }

    public void setDatePaid(Date datePaid) {
        this.datePaid = datePaid;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Date getDueDate() {
        return dueDate;
    }

    public void setDueDate(Date dueDate) {
        this.dueDate = dueDate;
    }

    public StakeholderEntity getStakeholder() {
        return stakeholder;
    }

    public void setStakeholder(StakeholderEntity stakeholder) {
        this.stakeholder = stakeholder;
    }

    public List<PaymentItemEntity> getPaymentItem() {
        return paymentItem;
    }

    public void setPaymentItem(List<PaymentItemEntity> paymentItem) {
        this.paymentItem = paymentItem;
    }

    public TransactionsEntity getTransaction() {
        return transaction;
    }

    public void setTransaction(TransactionsEntity transaction) {
        this.transaction = transaction;
    }

    public double getOutstandingBilling() {
        return outstandingBilling;
    }

    public void setOutstandingBilling(double outstandingBilling) {
        this.outstandingBilling = outstandingBilling;
    }
}